package com.smedi.ismedi.personnel.core.infrastructure.enumerate;

/**
 * @Author: xulinjun
 * @Date: 2021-6-7 16:18
 */
public enum PersonTypeEnum {
    COMPANY_MEMBER("COMPANY_MEMBER", "企业人员"),

    PROJECT_MEMBER("PROJECT_MEMBER", "项目分包人员"),

    /**
     * 新增类型，加在项目上，信息与项目人员信息一样
     */
    PROJECT_EXTERNAL_MEMBER("PROJECT_EXTERNAL_MEMBER", "项目外聘人员"),

    SYSADMIN("SUPER_ADMIN", "系统管理员");

    private String name;

    private String value;

    PersonTypeEnum(String value, String name) {
        this.name = name;
        this.value = value;
    }

    public static String getName(String value) {
        for (PersonTypeEnum c : PersonTypeEnum.values()) {
            if (c.getValue().equals(value)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
